package com.yijiu.trb;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;

import com.yijiu.adapter.NoticeAdapter;
import com.yijiu.network.Request;

public class NoticeListActivity extends BTitleActivity implements OnItemClickListener
{

	private ListView noticeListView;

	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_notice_list);
		findViewsInit();
	}

	private void findViewsInit()
	{
		titleView.setText("通知");
		noticeListView = (ListView) findViewById(R.id.lv_notice_list);
		NoticeAdapter noticeAdapter = new NoticeAdapter(this);
		noticeListView.setAdapter(noticeAdapter);
		noticeListView.setOnItemClickListener(this);
	}

	/* 操作成功返回的函数 */
	@Override
	public void getResult(Request r)
	{
		super.getResult(r);
	}

	/* 操作失败返回的函数 */
	@Override
	public void notifyError(int type, int errorCode, String errorMsg)
	{
		super.notifyError(type, errorCode, errorMsg);
	}

	/* 重复提交返回的函数 */
	@Override
	public void rePost(Request r)
	{
		super.rePost(r);
	}

	@Override
	public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3)
	{
		startActivity(new Intent(this, NoticeDetailsActivity.class));
	}
}
